Field of the Invention
The invention relates to data management and storage for software that provides additional functionality to document-based software.
Description of Related Art
There are many software applications designed for creating and editing text documents. Add-ins for these applications—which provide users additional functions and options for manipulating documents—frequently need to store data in documents created by such applications so that data can be stored during one editing session and retrieved in subsequent sessions. Examples of such data include: formatted text (i.e. text with font or paragraph attributes); non-formatted text (such as numbers or strings); images; sound files; binary data; or may consist of multiple data items, each of which needs to be associated with a specific location in the formatted text of the document.
In some situations, the applications' methods for storing this data in documents have serious drawbacks. For example, in Microsoft® Office Word, a standard method for storing data that can be used in multiple editing sessions involves inserting Word “fields” in the body of the document—either standard Word field types (such as TC and TOC fields for Table of Content entries and Table of Content fields) or custom fields which may be designated by an add-in for its own future use. Other data-storage methods are provided beginning with Microsoft® Word 2007, which involve the embedding of custom XML data within the body of the document.
There are numerous disadvantages to using fields or XML for this purpose. The act of inserting fields can be extremely slow and impede a user's ability to quickly update and store a document for later use. For instance, inserting a thousand fields in a document can often take a minute or more, and under certain circumstances, bugs found in the Word software can slow the insertion process down by an order of magnitude. Another problem is that if a field or XML is associated with a block of text immediately preceding or following the field or XML, and the block of text is moved, then the field or XML may be left behind in the original location and become disconnected from the associated text. A further problem is that if a field is used to store formatted text, and the user applies formatting to the surrounding text or paragraph, then the stored text may be inadvertently altered.
There are a number of document-based add-in applications (ranging from “metadata cleaners” to .PDF converters) that monitor the contents of a document while it is being edited, and sometimes alter the contents or the state of the Word application itself. If two such add-in applications are running simultaneously, they may conflict with each other as they modify document contents and cause performance problems; these problems may include dramatic slowdowns, alteration or corruption of document contents, or crashing of the Word application.
If an inexperienced user inadvertently turns on the display of field contents, then he or she may be confused by the display of normally hidden data. In addition, when the field codes are displayed, it is possible that the user could edit them by hand, which could result in loss of data or corruption of field contents.
Also, most data storage methods are proprietary to one or another specific document-based application, such that if an add-in depends too heavily on the particular methods provided, it may be impractical to create a version of the same add-in which works with different document-based application. For example, an add-in that works with Microsoft® Word may be difficult to port to WordPerfect®.